import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import MyPaper from "@/views/components/MyPaper.vue"
import Create from '../views/components/Create.vue'
import List from '../views/components/List.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      redirect: '/mypaper',
      children: [
        {
          path: 'mypaper',
          name: 'mypaper',
          component: MyPaper,
          children: [
            {
              path: '',
              name: 'list',
              component: List
            },
            {
              path: 'create',
              name: 'create',
              component: Create
            }
          ]
        }
      ]
    }
  ]
})

export default router
